import React from 'react';
import { View, Text, Button, ThemeManager, Colors, Card } from 'react-native-ui-lib';
import { TestCase, TestSuite } from '@rnoh/testerino';

ThemeManager.setComponentTheme('Text', (props, context) => {
    if (props.heading) {
        return {
            text40: true,      // 变大
            blue30: true,      // 变蓝
            marginB_10: true,  // 底部间距
        };
    }
});

const ThemeManagerDemo = () => {
    return (

        <TestSuite name="ThemeManager">
            <TestCase itShould="Text 组件带有 'heading' 属性: text40: true, blue30: true, marginB_10: true">
                <Text heading>ThemeManager Demo(带有 'heading' 属性)</Text>
                <Text>ThemeManager Demo(没有 'heading' 属性)</Text>
            </TestCase>
        </TestSuite>
    );
};


export default ThemeManagerDemo;